<template>
    <div>
        <!-- 视图 -->
<router-view></router-view>
<van-tabbar v-model="active" route>
  <van-tabbar-item replace :to="item.path" :icon="item.icon" v-for="item in tabbar">{{item.text}}</van-tabbar-item>
</van-tabbar>

    </div>
</template>

<script setup>
import {ref} from 'vue'
const active = ref(0);
const tabbar=ref([
    {path:'/home/sy',icon:'home-o',text:'首页'},
    {path:'/home/classify',icon:'star-o',text:'分类'},
    {path:'/home/shopping',icon:'cart-o',text:'购物车'},
    {path:'/home/my',icon:'manager-o',text:'我的'},
])
</script>

<style lang="scss" scoped>

</style>